<?php include"shared/head.php";
      include"shared/log.php";?>

<?php

//include "shared/moudles.php";

//echo "</br>".$name;

echo

'<form action="result.php" method="POST">
    <div class="form-group">
       <!-- <large class="form-text text-muted center-block">'.$welcome.'</large>-->
        <label for="exampleInputEmail1">'.$plz_inpt_searchterm.'</label>
        <input type="text" name="query" class="form-control">
       
    </div>

    <button type="submit" class="btn btn-primary">'.$search_button.'</button>
</form>';

include "shared/conn.php";
mysqli_select_db( $conn,"personalterm");
mysqli_query($conn, "set names 'utf-8");

$sql="SELECT * FROM `term`";
$result=mysqli_query($conn,$sql);


    echo "<table border='1'>
              <tr>
                  <td width='10%'>{$tb_head_id}</td>
                  <td width='30%'>{$tb_head_source}</td>
                  <td width='30%'>{$tb_head_target}</td>
                  <td width='30%'>{$tb_head_edit}</td>
                  
              </tr>";
    while($retshuzu=mysqli_fetch_array($result, MYSQLI_ASSOC))
    {
        $id=$retshuzu["id"];
        $zh_CN=$retshuzu["zh_CN"];
        $en_US=$retshuzu["en_US"];
        echo " <tr>
                  <td width='10%'>{$id}</td>
                  <td width='30%'>{$zh_CN}</td>
                  <td width='30%'>{$en_US}</td>
                  <td width='10%'>
                  <button ><a href='delete.php?tid={$id}'>{$delete}</a></button>
                  <button><a href='edit.php?tid={$id}'>{$edit}</a></button>
                  </td>
              </tr>";
    }

    mysqli_close($conn);
    echo "</table>";



?>

<?php include"shared/foot.php";?>

